Skip to content

Comments

fix(explorer): exclude approval events from Total column#600

Merged
o-az merged 1 commit intomainfrom
fix/explorer-approval-total
Feb 19, 2026
Merged

fix(explorer): exclude approval events from Total column#600
o-az merged 1 commit intomainfrom
fix/explorer-approval-total

Conversation

@snario
Copy link
Contributor

@snario snario commented Feb 19, 2026

Problem

ERC20 Approval events were being counted as value transfers in the Total column on the address transaction list. For example, a transaction with approve(1 USDC) + deposit(1 USDC) showed $2 instead of $1.

Approvals grant spending permission — no tokens are moved — so they should not contribute to the total value sum.

Fix

Filter out events with type === 'approval' before extracting amount parts for the Total calculation. Applied in both:

  • TransactionTotalCell in \$address.tsx (server-enriched path)
  • TransactionTotal in TxTransactionRow.tsx (client-enriched/token path)

Before / After

Tx Before After
approve(1 USDC) + deposit(1 USDC) $2 $1
transfer only unchanged unchanged

ERC20 Approval events were being counted as value transfers in the
Total column, inflating the displayed amount. For example, a tx with
approve(1 USDC) + deposit(1 USDC) showed $2 instead of $1.

Approvals grant spending permission — no tokens are moved — so they
should not contribute to the total value sum.
@github-actions
Copy link

Bundle Size Report

Metric Size Δ Change
Total 5.3 MB +512.1 KB (+10.5%)
Gzip 1.5 MB +188.3 KB (+14.1%)
Brotli 1.3 MB +157.3 KB (+13.6%)
Chunk changes (>1KB)
Chunk Change
assets/QueryBuilder.js (removed) -423.4 KB
assets/createSsrRpc.js (removed) -43.8 KB
assets/stringify.js (removed) -19.7 KB
assets/base.js (removed) -12.8 KB
assets/useWatchBlockNumber.js (removed) -2.1 KB
assets/utils.js -1.7 KB
assets/Intro.js +1.2 KB
assets/profiling.js +1.3 KB
assets/useChainId.js +1.7 KB
assets/_layout.js +1.7 KB
assets/wagmi.config.js +3.9 KB
assets/block-number.js (new) +4.3 KB
assets/_address.js +9.2 KB
assets/isAddressEqual.js +19.0 KB
index.js +92.4 KB
assets/router.js +156.8 KB
assets/fetch.js (new) +249.2 KB
assets/tempo-queries.js (new) +474.9 KB

Compared against main branch (baseline from 2/4/2026, 5:13:51 PM)

@github-actions
Copy link

Cloudflare Deployments

App Environment Status Preview
api - [>>] Skipped No changes
explorer devnet [OK] Deployed View Preview
explorer moderato [OK] Deployed View Preview
explorer presto [OK] Deployed View Preview
explorer testnet [OK] Deployed View Preview
fee-payer devnet [>>] Skipped No changes
fee-payer privy [>>] Skipped No changes
fee-payer testnet [>>] Skipped No changes
og - [>>] Skipped No changes
tokenlist - [>>] Skipped No changes

@o-az o-az merged commit 0c81263 into main Feb 19, 2026
14 checks passed
@o-az o-az deleted the fix/explorer-approval-total branch February 19, 2026 05:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants